Skip to content

chore: remove clicompat help templates and use urfave/cli defaults#1296

Open
burmudar wants to merge 1 commit intomainfrom
wb/simplify-clicompat-help
Open

chore: remove clicompat help templates and use urfave/cli defaults#1296
burmudar wants to merge 1 commit intomainfrom
wb/simplify-clicompat-help

Conversation

@burmudar
Copy link
Copy Markdown
Contributor

When migrating the abc command, it became apparent that the help rendering can quickly become annoying. It's better for us to just rely on the urfave/cli defaults.

Yes, there will be some visible inconsistency in help outputs now but in the long run I think it helps, since it requires less cognitive load to review + migrate a command.

Changes

  • remove custom help templates
  • remote WrapRoot and WithLegacyHelp
  • fixup version command to have better help formatting with urfave defaults

Test plan

src version old

Usage of 'src version':
  -client-only
        If true, only the client version will be printed.
  -dump-requests
        Log GraphQL requests and responses to stdout
  -get-curl
        Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
  -insecure-skip-verify
        Skip validation of TLS certificates against trusted chains
  -trace
        Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
  -user-agent-telemetry
        Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph (default true)

Examples:

  Get the src-cli version and the Sourcegraph instance's recommended version:

        $ src version

src version new

go run ./cmd/src version -h
NAME:
   src version

USAGE:
   src version [options]

DESCRIPTION:

   Display and compare the src-cli version against the recommended version for your instance

   Examples:

   Get the src-cli version and the Sourcegraph instance's recommended version:

   $ src version


OPTIONS:
   --client-only           If true, only the client version will be printed.
   --dump-requests         Log GraphQL requests and responses to stdout
   --get-curl              Print the curl command for executing this query and exit (WARNING: includes printing your access token!)
   --trace                 Log the trace ID for requests. See https://docs.sourcegraph.com/admin/observability/tracing
   --insecure-skip-verify  Skip validation of TLS certificates against trusted chains
   --user-agent-telemetry  Include the operating system and architecture in the User-Agent sent with requests to Sourcegraph
   --help, -h              show help

- fixup version command to have better help formatting with urfave
  defaults
@burmudar burmudar requested a review from a team April 15, 2026 15:12
@burmudar burmudar self-assigned this Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant